Skip to content

fix: prevent tool denial failures in daily-agent-of-the-day-blog-writer - #43070

Merged
pelikhan merged 3 commits into
mainfrom
copilot/aw-fix-tool-denial-issue
Jul 3, 2026
Merged

fix: prevent tool denial failures in daily-agent-of-the-day-blog-writer#43070
pelikhan merged 3 commits into
mainfrom
copilot/aw-fix-tool-denial-issue

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The blog writer workflow was hitting the 5/5 tool denial guardrail each run due to the agent attempting disallowed tools: python3 (for character counting), compound cd && git ... commands, git -C ..., and the non-existent read tool.

Changes

  • Added wc and expr to bash allowlist — gives the agent a supported way to count characters (echo -n "..." | wc -c) instead of falling back to python3
  • Strengthened git prohibition — the previous instruction only listed a few git subcommands; now explicitly bans all of them (git checkout, git branch, git add, git commit, git push, git status, and git *)
  • Clarified read tool absence — the agent was calling read(path) to verify file writes; added explicit note that no read tool exists and cat via bash is the correct alternative
  • Grounded the character-count step — replaced the vague "verify limits with a character count check" instruction with the concrete bash pattern to use
-  - Do not call unsupported `read`/`shell` tools.
-  - Do not run git branch/stage/commit commands in `bash` (`git checkout -b`, `git add`, `git commit`, `git push`)
+  - Do not call unsupported `read`/`shell` tools — there is no `read` tool; use `bash` with `cat` to inspect file contents instead.
+  - Do not run **any** git commands in `bash` — this includes `git checkout`, `git branch`, `git add`, `git commit`, `git push`, `git status`, and any other `git *` sub-command.
+  - To count characters in bash, use: `echo -n "your string" | wc -c` (not python3, not shell heredoc).

Note: git subcommands (git add:*, git branch:*, etc.) appear in the compiled lock.yml server args because the compiler auto-injects them for any workflow with create-pull-request in safe-outputs (tools.go:581). This is pre-existing compiler behavior; the instructions-layer fix is the appropriate scope for this PR.

Copilot AI and others added 2 commits July 3, 2026 03:10
- Add `wc *` and `expr *` to allowed bash commands so agent can count
  characters with `echo -n "..." | wc -c` instead of python3
- Strengthen tool restrictions: explicitly list ALL banned git commands
  (git checkout, git branch, git add, git commit, git push, git status)
- Clarify there is no `read` tool; agent must use `cat` via bash instead
- Provide concrete bash character-count example to prevent python3 usage
- Recompile workflow lock file

Closes #43066

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Daily Agent of the Day blog writer tool denial limit fix: prevent tool denial failures in daily-agent-of-the-day-blog-writer Jul 3, 2026
Copilot AI requested a review from pelikhan July 3, 2026 03:14
@pelikhan
pelikhan marked this pull request as ready for review July 3, 2026 03:16
Copilot AI review requested due to automatic review settings July 3, 2026 03:16
@pelikhan
pelikhan merged commit e160e6b into main Jul 3, 2026
@pelikhan
pelikhan deleted the copilot/aw-fix-tool-denial-issue branch July 3, 2026 03:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the daily-agent-of-the-day-blog-writer workflow instructions and compiled lockfile to reduce repeated tool-denial failures by steering the agent toward explicitly allowed bash utilities and away from disallowed/nonexistent tools.

Changes:

  • Expanded the workflow’s bash allowlist to include wc and expr.
  • Strengthened agent instructions to avoid all git usage and clarified the absence of a read tool.
  • Recompiled the workflow to reflect the updated tool allowlist in the generated .lock.yml.
Show a summary per file
File Description
.github/workflows/daily-agent-of-the-day-blog-writer.md Updates tool allowlist and refines agent instructions to avoid disallowed tools and git usage.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml Regenerated lockfile reflecting the updated allowed tools (notably expr).

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Low

- The `create_pull_request` patch must contain only text changes under `docs/src/content/docs/**`; never include binary assets in the PR patch — use `upload-asset` for those.
- Use only the enabled tools in this workflow (`bash`, `edit`, `agentic-workflows`, and safe-outputs). Do not call unsupported `read`/`shell` tools.
- Do not run git branch/stage/commit commands in `bash` (`git checkout -b`, `git add`, `git commit`, `git push`); `create_pull_request` handles branching and commit creation automatically.
- Use only the enabled tools in this workflow (`bash`, `edit`, `agentic-workflows`, and safe-outputs). Do not call unsupported `read`/`shell` tools — there is no `read` tool; use `bash` with `cat` to inspect file contents instead.
- Do not run git branch/stage/commit commands in `bash` (`git checkout -b`, `git add`, `git commit`, `git push`); `create_pull_request` handles branching and commit creation automatically.
- Use only the enabled tools in this workflow (`bash`, `edit`, `agentic-workflows`, and safe-outputs). Do not call unsupported `read`/`shell` tools — there is no `read` tool; use `bash` with `cat` to inspect file contents instead.
- Do not run **any** git commands in `bash` — this includes `git checkout`, `git branch`, `git add`, `git commit`, `git push`, `git status`, and any other `git *` sub-command. `create_pull_request` handles branching and commit creation automatically.
- To count characters in bash, use: `echo -n "your string" | wc -c` (not python3, not shell heredoc).
- Close with a short call to action pointing to `https://github.com/${{ github.repository }}`.
- Respect metadata limits before opening the PR: `seoDescription` <= 160 chars and `linkedPostText` <= 80 chars.
- Verify limits with a character count check before creating the PR; if either value is too long, revise and re-check.
- Verify limits using bash: `echo -n "your string" | wc -c`; if either value is too long, revise and re-check.
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Daily Agent of the Day Blog Writer exceeded tool denial limit

3 participants